home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
util
/
batch
/
TestDevice.readme
< prev
Wrap
Text File
|
1995-07-02
|
3KB
|
114 lines
Short: Does an IF EXISTS. Suppresses requester.
Author: wbow@crl.com (Will Bow)
Uploader: colin@cts.com
Type: util/batch
______ __ ____ _
/_ __/__ _____/ /_/ __ \___ _ __(_)_______
/ / / _ \/ ___/ __/ / / / _ \ | / / / ___/ _ \
/ / / __(__ ) /_/ /_/ / __/ |/ / / /__/ __/
/_/ \___/____/\__/_____/\___/|___/_/\___/\___/
__
| |__ _ _
| '_ \ || |
|_.__/\_, |
|__/
___ ___ _____ _ _ ___ __ _
| _ )/ _ \_ _| |_| | / __| ___ / _| |___ __ ____ _ _ _ ___
| _ \ (_) || | | _ | \__ \/ _ \ _| _\ V V / _` | '_/ -_)
|___/\___/ |_| |_| |_| |___/\___/_| \__|\_/\_/\__,_|_| \___|
Distribution: Freeware, freely distributable
Requirements: WB2.x and up
Might work on 1.3 (not tested)
Description:
Performs an "If Exists" on a device or device:filename. If the device
or filename does not exist, the resultant system requester will
be suppressed.
Returns a Zero if the device:file exists and a Five (Warn) if the
device:file does not exist.
Source, written in C, is available upon request.
Usage from a DOS Script or the shell:
testdevice device:[filename]
Example:
Assume your script wants to find out if a certain device has been
mounted. Normally you would issue an If Exists like this:
If Exists NET:
::
::
Endif
If NET: exists, the system returns a Zero and the script continues.
If NET: does not exist, a system requester will pop up, informing
the user that NET: is not mounted, and the script stops until the
requester is cleared with a mouse click.
Testdevice does the same thing, but will not stop the script with
a system requester if the device does not exist.
testdevice NET:
If Warn
; failed. NET: does not exist
::
::
Else
; suceeded. NET: is mounted.
::
::
EndIf
You may include a filename to test like this:
testdevice NET:node.rinfo
You may use testdevice to see if a floppy disk is physically
inserted into a floppy drive. Testdevice df0: will return a
five if a diskette is not in the drive.
Testdevice may be renamed. Volumes may be tested as well.
History
This file was written to overcome problems when starting ParNFS on
a remote, unattended A600T. Since no operator was present to
clear a system requester, a way had to be found to test the existance
of a device without the possibility of bringing the script to a
halt.
Installation:
Copy testdevice to any place in the path.
Authors: wbow@crl.com colin@cts.com
Will Bow Colin Thompson
============================= Archive contents =============================
Original Packed Ratio Date Time Name
-------- ------- ----- --------- -------- -------------
5980 3372 43.6% 16-Jun-95 15:45:34 +TestDevice
3087 1249 59.5% 16-Jun-95 15:45:34 +TestDevice.readme
-------- ------- ----- --------- --------
9067 4621 49.0% 17-Jun-95 18:15:04 2 files